package com.dubbo.boot.consumer.controller;

import com.dubbo.bean.Order;
import com.dubbo.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.websocket.server.PathParam;
import java.util.List;

/**
 * @author by Mr. Li 2020/11/20 15:16
 */
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/initOrder")
    public List<Order> initOrder(@PathParam("id") Integer id) {
        return orderService.initOrder(id);
    }

}
